import 'package:flutter/material.dart';
/// BSC绑定指引页面
///
class BscBindPage extends StatefulWidget {
  @override
  _BscBindPageState createState() => _BscBindPageState();
}
class _BscBindPageState extends State<BscBindPage> {
  @override
  Widget build(BuildContext context) {
    return  Scaffold(

        ///标题布局
        appBar: new AppBar(
          ///标题是否居中
          centerTitle: true,
          ///导航栏背景颜色
          backgroundColor: Colors.white,
          ///左侧返回按钮样式
          iconTheme: IconThemeData(
              color: Colors.black
          ),
          ///标题
          title: new Text(
            'BSC绑定指引',
            style: new TextStyle(color: Colors.black),
          ),
          ///右侧小能客服按钮
          actions: <Widget>[
            IconButton(
                icon: Image.asset('images/img_contans.png' ,width: 25.0,height: 25.0,),
                onPressed: (){
                  showAlertDialog(context);
                })
          ],
          elevation: 0.0,
        ),
        /// 内容body布局
        body: new SingleChildScrollView(

          child: new Column(
            children: <Widget>[
              ///老用户标题布局
              new Container(
                height: 50.0,
                padding: EdgeInsets.only(left:15.0),
                alignment: Alignment.centerLeft,
                color: Color(0xFFF6F5F5),
                child: Text('老用户',
                  style: TextStyle( color: Colors.black,fontSize: 16.0),),
              ),
              ///老用户内容
              new Container(
                height: 90.0,
                padding: EdgeInsets.only(left:15.0),
                alignment: Alignment.centerLeft,
                color: Colors.white,
                child: Text('打开BSC钱包App,复制BSC钱包地址,回到app绑定即可。',
                  style: TextStyle( color:  Color(0xFF666666),fontSize: 13.0),),
              ),
              ///新用户标题布局
              new Container(
                height: 50.0,
                padding: EdgeInsets.only(left:15.0),
                alignment: Alignment.centerLeft,
                color: Color(0xFFF6F5F5),
                child: Text('新用户',
                  style: TextStyle( color: Colors.black,fontSize: 16.0),),
              ),
              ///老用户内容
              new Container(
                height: 130.0,
                padding: EdgeInsets.only(left:15.0),
                alignment: Alignment.centerLeft,
                color: Colors.white,
                child: Text('打开BSC钱包AP下载BSC钱包APP，拥有属于您的BSC钱包专属地址，能够自由支配您手里的BSC积分。如有疑问，请联系客服P，复制BSC钱包地址，回到APP绑定即可。',
                  style: TextStyle( color: Color(0xFF666666),fontSize: 13.0),),
              ),
              ///下载地址标题布局
              new Container(
                height: 50.0,
                padding: EdgeInsets.only(left:15.0),
                alignment: Alignment.centerLeft,
                color: Color(0xFFF6F5F5),
                child: Text('BSC钱包APP下载地址',
                  style: TextStyle( color: Colors.black,fontSize: 16.0),),
              ),
              ///下载地址内容
              new Container(
                  height: 90.0,
                  padding: EdgeInsets.only(left:15.0),
                  alignment: Alignment.centerLeft,
                  color: Colors.white,
                  child: new Row(
                    children: <Widget>[
                      Text('http://down.dreamtowns.net/client/',
                        style: TextStyle( color:  Color(0xFF666666),fontSize: 13.0,
                            decoration: TextDecoration.underline),
                      ),
                      Text('（仅支持安卓版）',
                        style: TextStyle( color:  Color(0xFF666666),fontSize: 13.0),),
                    ],
                  )

              ),
            ],
          ),
        ),
      );


  }


  /// dialod弹框
  void showAlertDialog(BuildContext context) {
    showDialog(
        context: context,
        builder: (_) => new AlertDialog(
            title: new Text("提示"),
            content: new Text("客服功能不支持,你去咬耿宴吧"),
            actions:<Widget>[

              new FlatButton(child:new Text("咬死他"), onPressed: (){
                Navigator.of(context).pop();

              },)
            ]

        ));
  }


}
